<?php
include_once('../lib/config.php');
require ($war_root.'/lib/verify.php');
require ($war_root.'/lib/has_char.php');
require ($war_root.'/lib/is_approved.php');
require ($war_root.'/lib/is_admin.php');

$_category = "Admin";
$_title = "";
$admin_active = 1;
$log_char = $character["character_name"];
$debug=0;

if (@$_GET ['a'] != "adding" || @$_GET ['s'] == 2) require ($war_root.'/lib/head.php');

$page = @$_GET ['p'];
$action = @$_GET ['a'];
$raid_id = @$_GET ['raid'];
$system_id = @$system ["system_id"];




/*****************************
* Start Settings part
*****************************/

//
//Lock or unlock the wishlist (2)
//
if(@$_GET['s'] == 2) {
	//$character_id = $_GET["id"]; #For later use
	if(@$_GET['p'] == "u") $nu = 0;
	elseif(@$_GET['p'] == "l") $nu = 1;

	$sql = "update wm_systems set system_locked='$nu' where system_id='$system_id'";
	$result = $db->query($sql);
}



//
//Start the actual settings box, with the lock/unlock link
//
boxTop ( "Settings" );

echo 'The wishlist is currently ';
$sql = "select system_locked from wm_systems where system_id='$system_id'";
$result = $db->query($sql);
$lock = $db->fetch_assoc($result);
if($lock['system_locked'] == 1) echo '<a href="'.$war_http.'/admin/?p=u&id='.$character['character_id'].'&s=2">locked.</a>';
elseif($lock['system_locked'] == 0) echo '<a href="'.$war_http.'/admin/?p=l&id='.$character['character_id'].'&s=2">open.</a>';
else die('Database error, please contact an administrator.');


boxBot ();


require ($war_root.'lib/foot.php');
?>
